package com.example.huajia.wx.db.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

@Data
@Document(collection = "dynamic")
public class DynamicEntity implements Serializable {
    @Id
    private String _id; // 主键
    @Indexed(unique = true)
    private String uuid; // 唯一id
    private String promulgator;//发布者账号
    private String promulgatorName;//发布者昵称
    private String promulgatorImage; // 发布者头像
    private int age;//年龄
    private double height;//身高
    @Indexed
    private String content;//文字内容
    private String video;//视频内容
    private List<String> photos;//图片url集
    @Indexed
    private String city;//城市
    private String address;//城市
    private String income;//收入
    private List<String> label; // 标签
    private String status;//状态
    @Indexed
    private String createTime; // 创建时间
    @Indexed
    private String updateTime;// 更新时间
    private List<String> like;//点赞用户
    private Integer likeCount;//点赞用户数量
    private Boolean isLike;
    @DBRef
    private List<CommentEntity> comments; //直接下级评论
    private List<CommentEntity> comment; //直接下级评论
    private Integer commentsCount; //直接下级评论
    @Indexed
    private boolean deleted;//删除标记
}
